<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.min.js"></script>
  <div id="app">
    {{msg}}===n：{{n}}==={{n==1?'我是true':'我是false'}}==={{str.toUpperCase()}}==={{obj.name}}==={{arr}}==={{say}}==={{flag}}

    <!-- 错误写法 -->
    <!-- {{id}} -->
    <!-- <h1 class="">{{arr2}}</h1> -->
    <!-- <h1 class="">{{arr3}}</h1> -->
  </div>
  <script>
    const vm = new Vue({
      el: "#app",
      data: {
        msg: 'hello  vue',
        n: 1,
        str: 'abc',
        obj: {
          name: 'jack1'
        },
        arr: [1, 2, 3],
        say: function () { },
        flag: true
      }
    })

    console.log(vm.n);
  </script>
</body>

</html>